﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LinkEdit.aspx.cs" Inherits="CNVP.JShop.Web.Admin.LinkEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
            <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="IE=7" http-equiv="X-UA-Compatible" />
    <link href="CSS/Edit.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.js" type="text/javascript"></script>
    <script src="../Scripts/Common.js" type="text/javascript"></script>
    <script type ="text/javascript">
        $(function () {
            $("#btUp").click(function () {
                var $txtLinkName = $("#txtLinkName");
                var $txtOrderID = $("#txtOrderID");
                var $ddlLinkClassID = $("#ddlLinkClassID");
                if ($ddlLinkClassID.val() == "0") {
                    alert("请选择类别！");
                    $ddlLinkClassID.focus();
                    return false;
                }
                if ($txtLinkName.val() == "") {
                    alert("请输入名称！");
                    $txtLinkName.focus();
                    return false;
                }
                var $txtLinkAddress = $("#txtLinkAddress");
                if (!IsValidURL($txtLinkAddress.val())) {
                    alert("链接地址格式不正确！");
                    $txtLinkAddress.focus();
                    return false;
                }
                if ($txtOrderID.val() == "") {
                    alert("请输入排序！");
                    $txtOrderID.focus();
                    return false;
                }
                else if (!IsInteger($txtOrderID.val())) {
                    alert("排序格式不正确！");
                    $txtOrderID.focus();
                    return false;
                }
            });
        })
   </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="Content">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="cell">
                <tr>
                    <td class="cell_group">
                        <img src="Images/ListIconTitle.jpg" alt="" />&nbsp;您的位置：<a href="LinkList.aspx">友情链接</a><asp:Label ID="lbTitle" runat="server"></asp:Label>
                    </td>
                </tr>
                </table>
                     <table border="0" cellpadding="0" cellspacing="0" class="division">
                         <tr>
                            <th>
                                  分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类:</th>
                            <td>
                                 <asp:DropDownList ID="ddlLinkClassID" runat="server" Width="150px">
                                    <asp:ListItem Value="0">--请选择--</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                        </tr>
                        <tr>
                            <th>
                                 名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称:</th>
                            <td>
                                 <asp:TextBox ID="txtLinkName" runat="server" MaxLength="50"/>
                                </td>
                        </tr>
                        <tr>
                            <th>
                                 链接地址:</th>
                            <td>
                                 <asp:TextBox ID="txtLinkAddress" runat="server" MaxLength="255" Text="http://" Width="350px" />
                                </td>
                        </tr>
                        <tr>
                            <th>
                                 链接图片:</th>
                            <td>
                                 <asp:FileUpload ID="fileUp" runat="server" />
                                 <br />
                                <a href ="<%=picOriginal %>" target="_blank"><asp:Image ID="imgPic" runat="server" Visible="false" CssClass="ClassAdName" /></a>
                                </td>
                        </tr>
                         <tr>
                             <th>
                                 地址图片:</th>
                            <td>
                                <asp:TextBox ID="txtPicOldName" runat="server" Width="350px" ></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                  显&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;示:</th>
                            <td>
                                  <asp:RadioButtonList ID="rblLinkType" runat="server" 
                                      CssClass="RadioButtonListTable" RepeatDirection="Horizontal" Width="100px">
                                    <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                    <asp:ListItem  Value="0">否</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                        </tr>
                        <tr>
                            <th>
                                 排&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序:</th>
                            <td>
                                  <asp:TextBox ID="txtOrderID" runat="server" MaxLength="50" Text="0" />
                                </td>
                        </tr>
                    </table>
            <div class="EditBtn">  
            <asp:Button ID="btUp" runat="server" Text="提交" OnClick="btUp_Click" />
            <input type="button" value="取消" onclick="javascript:history.go(-1)" />
            </div>
        </div>
        <script type="text/javascript">
            ImgSize("ClassAdName", 400, 300);
      </script>
    </form>
</body>
</html>

